package cn.edu.jsu.zjj.model.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * 操作日志记录
 * </p>
 *
 * @author fyt
 * @since 2024-05-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_oper_log")
@ApiModel(value="OperLog对象", description="操作日志记录")
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class OperLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "日志主键")
    @TableId(value = "oper_id", type = IdType.ASSIGN_ID)
    private Long operId;

    @ApiModelProperty(value = "操作人员")
    private String operName;

    @ApiModelProperty(value = "操作时间，单位毫秒")
    private LocalDateTime operTime;

    @ApiModelProperty(value = "消耗时间")
    private Long costTime;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "状态（0代表成功 1代表失败）")
    private String status;

    @ApiModelProperty(value = "用户角色：user/admin")
    private String roles;

//    以下为新增属性
    @ApiModelProperty(value = "操作人员name")
    private String userName;

    @ApiModelProperty(value = "操作人员id")
    private Long userId;

}
